home *** CD-ROM | disk | FTP | other *** search
/ MacWorld: Complete Mac Interactive / Macworld Complete Mac Interactive CD)(1994).iso / The Best of BMUG / Utilities / PowerBook Utilities / Menuette 1.1.2 / Menuette / Menuette.rsrc / TEXT_135_Technical Info About Sets.txt < prev    next >
Text File  |  1993-02-27  |  11KB  |  85 lines

  1. These instructions describe how to create or modify Menuette Sets ‚Äî the files that Menuette uses to draw icons in the menu bar. In order to do this, you currently must use a resource editor. If you do not wish to create your own Menuette Set files, or if you do not own a resource editor, you should skip this section and use the extra time you‚Äôll have to do something useful, such as learning Esperanto or taking up gardening.
  2.  
  3. ResEdit (Apple Computer, Inc.) and Resorcerer (Mathem√¶sthetics, Inc.) are two popular resource editors. This section assumes you are comfortable with the concept of resource files and with the use of one of these programs. We‚Äôll also assume you‚Äôre using ResEdit, but the instructions apply equally to both programs (and templates are provided for both).
  4.  
  5. Although the process is relatively simple, this help topic is quite long compared to most other sections. If you are going to be creating Menuette Sets, and you haven‚Äôt already printed all of the help topics, you‚Äôll probably want to print this one so that you can refer to it while you work. You can print this topic by clicking the Print This Topic button below.
  6.  
  7.  
  8. A Menuette Set file is a resource file containing three basic categories of resources:
  9. 1.  The icons themselves (ics#, ics4, and ics8 resources);
  10. 2.  A map detailing which menu title words to replace with which icons (the Mapz resource); and
  11. 3. A description of the program the icons are intended for (the Info resource).
  12.  
  13. You should examine one of the Sets provided with Menuette to get a basic idea of how the resources are used. Before you open a Set, though, you‚Äôll want to be sure that you make templates available to your resource editor ‚Äî this will allow you to see and edit properly formatted versions of the Info and Mapz resources. If you‚Äôre using ResEdit, open the file called Menuette Templates (ResEdit) and leave it open. If you‚Äôre using Resorcerer, place the file named Menuette Templates (Resorcerer) in your Resorcerer¬Æ Templates folder before launching Resorcerer.
  14.  
  15. The rest of this section walks  you through the steps necessary to create a new Menuette Set. You might find it easier to duplicate an existing Set, then modify the resources it contains. Either way, it‚Äôs quite simple ‚Äî but to ensure that your Menuette Set works properly, pay particular attention to
  16. ‚Ä¢ bulleted items,
  17. which list important rules to follow.
  18.  
  19.  
  20. 1.  First of all, note that there are two kinds of Menuette Sets ‚Äî files that contain menus for a single program, and a special Universal Set, which contains icons intended for all programs.
  21.  
  22. ‚Ä¢ Do not add icons to, or remove them from, the Universal Set.
  23.  
  24. Users and other Set authors count on the Universal Set to provide icons for these menu titles: File, Edit, Font, Style, Size, Window, Windows, View, Views, Option, Options, Utility, Utilities, and Tools. If you want to use different icons for a menu title that is supplied in the Universal Set, simply include an icon in a program-specific Set as detailed below ‚Äî icons you place in program-specific Sets will always override Universal Set icons. If you really feel the need to alter your Universal Set, be sure you rename it so it is obvious that it is not the original Universal Set that comes with Menuette. 
  25.  
  26. These instructions will assume that you‚Äôre creating a program-specific Set.
  27.  
  28.  
  29. 2.  Now make sure that you have opened or installed the appropriate Menuette Templates document, as mentioned above. Create a new file (or duplicate and open an existing Menuette Set); this will be your Menuette Set. If you have created a new file, you will need to set that file‚Äôs creator code and type.
  30.  
  31. ‚Ä¢ Every Menuette Set file must have a creator code of rob‚àë and a type of MSet.
  32.  
  33. The ‚Äò‚àë‚Äô character is produced by pressing option-w. If the creator is not rob‚àë, the file will not automatically open in our hopefully forthcoming Menuette Editor. If the type is not MSet, the Set will not work at all. You can change the file type and creator by choosing Get Info For‚Ķ from the File menu in ResEdit. Remember that file type codes and resource type names are case sensitive ‚Äî be sure to use rob‚àë and MSet, not ROB‚àë or MSET.
  34.  
  35.  
  36. 3.  The next step is to create the icons themselves. For each icon that you will use, create a new ics# resource. To do so, choose ‚Äî surprise! ‚Äî Create New Resource from the Resource menu in ResEdit. Type ics# in the box provided for the resource type, or choose it from the list of available resource types.
  37.  
  38. ‚Ä¢ To avoid conflicts, be sure that the resource number of the ics# resource is greater than 500.
  39.  
  40. Due to the way many program icons are stored, using lower resource numbers for Menuette Set icons (including ResEdit‚Äôs default number of 128) can occasionally cause the icons to appear elsewhere on the screen as well as in the menu bar. Using higher numbers makes conflicts unlikely. Use ResEdit‚Äôs Get Resource Info command to change the number.
  41.  
  42. Draw the black-and-white version of the icon in the ics# window (or copy and paste it from a painting program).
  43.  
  44. ‚Ä¢ For each icon you create, there must always be a black-and-white icon with a mask. Do not create ics4 or ics8 resources without a matching ics#.
  45.  
  46. Next, create the color icons: if you draw in the color portions of the ics# window, ResEdit will automatically create ics4 (4-bit, 16-color) and ics8 (8-bit, 256-color) resources as appropriate.  Drag the black-and-white version of the icon down onto the empty space provided for color icons, then add color as needed. This will ensure that your icons have identical shapes.
  47.  
  48. When creating 8-bit color icons, you can use all available 256 colors if you wish ‚Äî there is no need to limit yourself to the ‚ÄúApple Icon Colors‚Äù as there is when you are designing Finder icons. On the other hand, a little color goes a long way, and Apple has provided the smaller set of icon colors in the hope that designers will make subtle use of color, rather than splash garish color all over the screen. Have you ever seen a Macintosh with a menu bar that‚Äôs been colored bright green with dark red letters? And didn‚Äôt you think, ‚ÄúHow can he (or she) use that?‚Äù Trust us on this one; most other people won‚Äôt like your icons if they all look like video-game spaceships.
  49.  
  50. You might want to take a break and read about the use of color in computer interfaces: Apple Computer provides Macintosh Human Interface Guidelines, and we ourselves swear by our copy of The Art of Human-Computer Interface Design, edited by Brenda Laurel (Addison-Wesley, ISBN 0-201-51797-3).
  51.  
  52. These books are actually interesting reading, and heeding their advice will give your icons the appearance that they fit in with everything else on your screen. Of course, it is your Macintosh, and one of the rights you have as a Macintosh owner is that when given the proper tools, such as ResEdit and Menuette, you can do whatever you want. Our final piece of advice on this subject, then, is ‚Äúhave fun.‚Äù
  53.  
  54. You don‚Äôt have to include 4-bit or 8-bit color icons if you don‚Äôt want to: the Macintosh will fall back to the most colorful icon available in the Set. This can save some space; for example, if you are happy with the 4-bit color version of your icon and don‚Äôt need the extra colors of 8-bit color, you don‚Äôt need to include an ics8 resource for that icon.
  55.  
  56. You should now have a file containing an ics# resource for each menu title you want to replace, together with optional ics4 and ics8 resources for each icon if you have created 4-bit or 8-bit color versions.
  57.  
  58.  
  59. 4.  Next, create a Mapz resource, which is used by Menuette to determine which menu title should be replaced with which icon.
  60.  
  61. ‚Ä¢ Each Menuette Set should have one Mapz resource, which should be Mapz resource number 128.
  62.  
  63. Each time a program adds a menu to the menu bar, Menuette examines your Mapz resource to see if it contains the menu‚Äôs title. If it does, Menuette replaces it with the Menuette Set icon whose number is specified on that Mapz line.
  64.  
  65. So, you‚Äôll want to add a line to your Mapz resource for each menu title you plan to replace with an icon. Be sure to spell the menu title exactly the same way the program spells it. Some menu titles (especially those from desk accessories) have hidden characters in them ‚Äî if this is a problem, you can sometimes open the program in ResEdit and copy the menu title, hidden characters and all, from the MENU resource.
  66.  
  67. You should now have a file containing a number of icons and a single Mapz resource, numbered 128.
  68.  
  69.  
  70. 5.  The final remaining step is to add an Info resource.
  71.  
  72. The Info resource is used by Menuette to determine which program the icons included with the file are intended for. When you turn on the Macintosh or add files to the Menuette Sets folder, Menuette examines the Info resource present in each Set and makes a note of the creator code listed there. If a program with that creator code is later used, Menuette opens the Menuette Set and uses the icons within it (replacing individual menu titles according to the Mapz resource).
  73.  
  74. Add the Info resource now.
  75.  
  76. ‚Ä¢ Each Menuette Set must have one Info resource, which should be Info resource number 128.
  77.  
  78. The only part of the Info resource that is absolutely necessary is the creator code of the program in question. To find out the creator code of a program using ResEdit, choose Get File/Folder Info‚Ķ from the File menu, find the program, and open it ‚Äî the creator code is the four-letter code listed in the box labeled ‚ÄòCreator:‚Äô. Close that window and type the creator code you‚Äôve just learned into the appropriate box into the Menuette Set Info resource. Again make sure you copy the code exactly, not changing capitalization. And by the way, don‚Äôt confuse the creator code listed here with the Menuette Set‚Äôs own creator code, which will always be rob‚àë ‚Äî the creator code in the Info resource is the one that belongs to the application whose menus you‚Äôre changing.
  79.  
  80. The other spaces of the Info resource are for your personal use, except the ‚ÄúReserved‚Äù space, which should be left alone. Normally, though, you will want to include the name and version number of the program the Set is intended for in the ‚ÄúProgram Name‚Äù space, and also put your name and possibly some copyright information in the ‚ÄúYour Comments‚Äù space.
  81.  
  82.  
  83. That‚Äôs it! You‚Äôve created a Menuette Set. For consistency with other Sets, you should give your Set a name consisting of the name of the program it‚Äôs intended for and the version number of the copy you‚Äôve used to create the Set, followed by the word ‚ÄúSet‚Äù. Place the new Set into your Menuette Sets folder and launch the program ‚Äî it should work.
  84.  
  85. If it doesn‚Äôt work, you might want to check over the bulleted items above to see what the trouble is, and make sure that your Mapz entries match the menu titles exactly (look for hidden characters in the menu titles!).